
#if !defined(__IPHONE_3_0)

#include "WindowManager.h"
#include "XWindow.h"
#include "W32Window.h"

namespace p2 {
using boost::shared_ptr;

shared_ptr<Window> WindowManager::createWindow(WindowCreateStruct const& cs)
{
#if defined(_WIN32)
	shared_ptr<Window> newWindow(new W32Window(cs));
#else
	shared_ptr<Window> newWindow(new XWindow(cs));
#endif
	uint32 error = newWindow->create();
	if (error) {
		return shared_ptr<Window>();
	}
	_windows.push_back(newWindow);
	return newWindow;
}

}

#endif	//#if !defined(__IPHONE_3_0)
